// var $ = require('./../lib/jquery.min.js');
var artT = require('art-template/lib/template-web');
var a = require('./a');
a();

var data = {
  content: [{
      title: 'hello',
      name: 'dk'
    },
    {
      title: 'hi',
      name: 'bl'
    },
    {
      title: 'hey',
      name: 'gy'
    },
  ],
  user: {
    name: 'donyang'
  }
};

//data是服务端传来的数据
function htmlRender(data) {

  var tpl = require('./../tpl/test.art');

  // var render = artT.compile(tpl); //render被编译成一个函数了

  // var html = render(data);
  var html = tpl(data);
  $('#box').html(html);
}
htmlRender(data);